ActiveReports 8
Using Parameters in SubReports
Show AllShow All
Hide AllHide All

Using parameters in SubReport, you can connect a SubReport to the parent report. By setting the parameter on the field that binds the parent report to SubReport, the parent report passes the data to display in SubReport through a parameter. This walkthrough illustrates the method to link the main report with a SubReport using parameters. 

This walkthrough is split up into the following activities:

Note: This walkthrough uses tables from the NorthWind database. By default, in ActiveReports, the NWind.mdb file is located in the [User Documents folder]\ComponentOne Samples\ActiveReports 8\Data folder.
Caution: SubReports do not render PageHeader and PageFooter sections.

When you complete this walkthrough you get a layout that looks similar to the following:

To add an ActiveReport to the Visual Studio project

To connect the Parent Report (rptParent) to a data source

To connect the subreport (rptChild) to a data source using parameter

To create a layout for the Parent Report (rptParent)

To create a layout for the SubReport (rptChild)

To connect the SubReport (rptChild) to the SubReport control in parent report (rptParent)

To set the ShowParametersUI property of SubReport to False

To view the report

 

Support Forum